home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks '96 / PredatorPrey / PredPrey.µ.Rsrc / PredPrey.µ.Rsrc.rsrc / TEXT_1036_Roll Down, Up, ExchXY.txt < prev    next >
Encoding:
Text File  |  1996-06-22  |  825 b   |  31 lines

  1. - ROLL DOWN, ROLL UP, X EXCH Y 
  2. ROLL DOWN, ROLL UP, X EXCH Y
  3.  
  4. R| (roll down), R^ (roll up),
  5.  V               |
  6. and X><Y(X exchange Y).
  7. R| and R^ roll the contents of
  8.  V      |
  9. the stack registers up or down one register(one value moves between the X- and the T-register). No values are lost. X><Y exchanges the numbers in the X- and Y-registers. If the stack were loaded with the sequence 1, 2, 3, 4, the following shifts would result from
  10. pressing R|, R^, and X><Y.
  11.           V   |
  12.  
  13.       |--------|      |--------|
  14.  T 1- | -----| |-> 4 -| |----- | -> 1
  15.  Z 2- | ---| |---> 1 ---| |--- | -> 2
  16.  Y 3- | -| |-----> 2 -----| |- | -> 3
  17.  X 4--|  |-------> 3 -------|  |--> 4
  18.  
  19. Keys:        R|       g R^
  20.               V          |
  21.  
  22.  
  23.  T 1 ---------> 1
  24.  Z 2 ---------> 2
  25.  Y 3 ---|  |--> 4
  26.  X 4 -| |- | -> 3
  27.       |----|
  28.  
  29. Keys:  X><Y
  30.  
  31.